package com.poi.qianmi.fetch.demo2;

import com.poi.qianmi.fetch.demo2.handle.ExcelParserHandler;
import com.poi.qianmi.jol.JolDetection;
import com.poi.qianmi.model.User;
import com.poi.qianmi.path.GlobalPath;
import lombok.SneakyThrows;
import org.junit.Test;

import java.io.File;
import java.io.FileInputStream;
import java.util.List;

/**
 * @Classname Fetch2Application
 * @Description 转化为xml读取-
 * @Date 2019/9/19 7:57 下午
 * @Created by xiaocai
 */
public class Fetch2Main {

    @SneakyThrows
    public static void main(String[] args) {
        long startTime = System.currentTimeMillis();
        File file = new File(GlobalPath.getInstance(20));
        FileInputStream inputStream = new FileInputStream(file);
        ExcelParserHandler parse = new ExcelParserHandler().parse(inputStream);
        List<User> userList = parse.getUserList();
        long endTime = System.currentTimeMillis();
        System.out.println("处理数据条数：" + userList.size() + " 条");
        System.out.println("程序运行时间： " + (endTime - startTime) + "ms");
    }
}
